package com.xmtlxx.web.controller.wms.service;

import com.xmtlxx.common.core.domain.PageQuery;
import com.xmtlxx.common.core.page.TableDataInfo;
import com.xmtlxx.common.tengbo.vo.SmartCabinetOutVo;
import com.xmtlxx.common.tengbo.vo.SmartCabinetPickProVo;
import com.xmtlxx.wms.domain.Pick;
import com.xmtlxx.wms.domain.bo.OutboundHandoverBo;
import com.xmtlxx.wms.domain.bo.PickBo;
import com.xmtlxx.wms.domain.vo.PickDtlVo;
import com.xmtlxx.wms.domain.vo.PickVo;

import java.util.Collection;
import java.util.List;

/**
 * 挑拣任务Service接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface IPickService {

    /**
     * 查询挑拣任务
     *
     * @param id 挑拣任务主键
     * @return 挑拣任务
     */
    PickVo queryById(String id);

    List<PickVo> queryByTaskId(String id);

    /**
     * 查询挑拣任务列表
     *
     * @param bo 挑拣任务
     * @return 挑拣任务集合
     */
    TableDataInfo<PickVo> queryPageList(PickBo bo, PageQuery pageQuery);

    /**
     * 查询挑拣任务列表
     *
     * @param bo 挑拣任务
     * @return 挑拣任务集合
     */
    List<PickVo> queryList(PickBo bo);

    /**
     * 修改挑拣任务
     *
     * @param bo 挑拣任务
     * @return 结果
     */
    Pick insertByBo(PickBo bo);

    /**
     * 修改挑拣任务
     *
     * @param bo 挑拣任务
     * @return 结果
     */
    Pick updateByBo(PickBo bo);

    Pick updateTaksByBo(PickBo bo);

    /**
     * 校验并批量删除挑拣任务信息
     *
     * @param ids     需要删除的挑拣任务主键集合
     * @param isValid 是否校验,true-删除前校验,false-不校验
     * @return 结果
     */
    Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);

    PickVo pickVoByExWarehouse(String exWarehouseId);

    PickVo initBeanPickVo(String exWarehouseId);

    PickVo pickVoByDeal(String dealId);

    PickVo initBeanDealPickVo(String dealId);

    Boolean syncUpdateBatchOutSmartCabinet(SmartCabinetOutVo data);

    void pushPickDatas(String id);

    List<PickDtlVo> deleteWithBoxByIds(String boxId, String id);

    /**
     * 获取智能柜拣选财物(出柜)
     *
     * @param smartCabinetId 智能柜id
     * @return java.util.List<com.xmtlxx.common.tengbo.vo.SmartCabinetPickProVo>
     * @author hergreen
     * @date 2024/08/23 14:38
     */
    List<SmartCabinetPickProVo> getSmartCabinetPickPro(String smartCabinetId);

    /**
     * 获取出库交接
     *
     * @param pageQuery 分页
     * @param bo        bo
     * @return com.xmtlxx.common.core.page.TableDataInfo<com.xmtlxx.wms.domain.bo.OutboundHandoverBo>
     * @author hergreen
     * @date 2024/10/31 17:38
     */
    TableDataInfo<OutboundHandoverBo> getOutboundHandoverList(PageQuery pageQuery, OutboundHandoverBo bo);

}
